/**
 * ProjectLayersService.java
 *
 * Copyright (c) 2010 Prj.Manager All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of Prj.Manager .
 **/
package ro.prjmanager.service;



import ro.prjmanager.core.service.AbstractService;
import ro.prjmanager.core.service.Service;
import ro.prjmanager.dao.ProjectLayersDao;
import ro.prjmanager.model.ProjectLayers;

import java.util.List;

/**
 * This class is business logic for project_layers table
 * It manages all transaction maded to project_layers table
 * @author Viorel Tacliciu
 * @version 2
 **/


public class ProjectLayersService  extends AbstractService<ProjectLayers,Integer> implements Service<ProjectLayers,Integer> {

    

    public void create(ProjectLayers user){
        dao.create(user);
    }


    public void delete(Integer id){
        ProjectLayers delObj =new ProjectLayers();
        delObj.setId(id);
        dao.delete(delObj);
    }

    public ProjectLayers load(Integer id){
         return dao.find(id,false);
    }

    public List<ProjectLayers> listPag(int startPage,int resPerPage){
          return dao.listPag(startPage, resPerPage);
    }

    public List<ProjectLayers> listPagFilter(int startPage,int resPerPage,String filter){
          return dao.listPagFilter(startPage, resPerPage, filter);
    }

    public int no(String filter) {
        return dao.no(filter);
    }

    public void update( ProjectLayers entity) {
        dao.update(entity);
    }

    public List<ProjectLayers> listPag(int startPage, int resPerPage, String orderCol, boolean asc, Object... otherItems) {
        return dao.listPag(startPage, resPerPage,orderCol,asc, otherItems);
    }

    public List<ProjectLayers> list() {
        return dao.findAll();
    }

}
